﻿using NET6.WebAPI.Attributes;
using NET6.WebAPI.Enums;

namespace NET6.WebAPI.Exceptions
{
    public class BusinessException { }

    /// <summary>
    /// 记录不存在异常
    /// </summary>
    [ExceptionResponse(ExceptionResponseCode.NotExists)]
    public class NotExistsException : Exception { }

    /// <summary>
    /// 名称重复异常
    /// </summary>
    [ExceptionResponse(ExceptionResponseCode.NameDuplicate)]
    public class NameDuplicateException : Exception { }

    /// <summary>
    /// 无效的业务状态异常
    /// </summary>
    [ExceptionResponse(ExceptionResponseCode.InvalidStatus)]
    public class InvalidStatusException : Exception { }
}
